import React, {Component} from 'react';
import {Layout} from 'antd';
import LeftNav from '../../components/left-nav';
import Header from '../../components/header';
import ComInformation from '../com_information/index';
import Public from '../resume_information/public';
import Private from '../resume_information/private';
import Recharge from '../recharge/index';
import UpdateComInformation from '../com_information/com_information_update';
import AddComInformation from '../com_information/com_information_add'
import Test from '../Test/demo'
import {Redirect,Route, Switch} from 'react-router-dom';

const {Footer, Sider, Content} = Layout;
/*
* 后台主页的路由组件*/
export default class Admin extends Component {
    render() {
        return (
            <Layout style={{height: "100%"}}>
                <Sider>
                    <LeftNav/>
                </Sider>
                <Layout>
                    <Header/>
                    <Content style={{margin:20, backgroundColor: '#fff'}}>
                        <Switch>
                            <Route path='/com_information' component={ComInformation}/>
                            <Route path='/com_information_update' component={UpdateComInformation}/>
                            <Route path='/com_information_add' component={AddComInformation}/>
                            <Route path='/resume/public' component={Public}/>
                            <Route path='/resume/private' component={Private}/>
                            <Route path='/recharge' component={Recharge}/>
                            <Route path='/test' component={Test}/>
                            <Redirect to='/com_information'/>
                        </Switch>
                    </Content>
                    <Footer style={{textAlign: 'center'}}>由南京市夏洛云网络科技有限公司提供</Footer>
                </Layout>
            </Layout>
        )
    }
}
